<?php

import('Form.~');
import('Form.Element.Fieldset');
import('Form.Element.InputFile');
import('Form.Element.InputHidden');
import('Form.Element.InputSubmit');
import('Form.Element.InputReset');


class FormAddImage extends Hoa_Form {

	/**
	 * FormContact::__construct()
	 *
	 */
	public function __construct ( ) {

		/**
		 * On définit notre action.
		 */
		parent::__construct('#');
		$this->setAttribute('enctype', 'multipart/form-data');

		$fieldset = new Hoa_Form_Element_Fieldset('Ajouter un article');

		$fieldset->addElements(array(
			'photo'          => array(
			   'type'       => Hoa_Form::ELEMENT_INPUT_FILE,
				'attribute' => array(
				    'id'    => 'photo',
				    'name'  => 'photo'
				),
				'label'     => 'Télécharger une image:'
			)
		));

		/**
		 * On crée le bouton de soumission.
		 */
		$submit = new Hoa_Form_Element_InputSubmit('login');
		$reset = new Hoa_Form_Element_InputReset('reset');

		$fieldset->addElement($submit);
		$fieldset->addElement($reset);

		$this->addElement($fieldset);


	}
}